package com.example.demo2.Util;

import com.example.demo2.generator.entity.R;
import org.springframework.web.bind.annotation.ExceptionHandler;

public class GlobalExceptionHandler {


//    @ExceptionHandler(Throwable.class)//拦截所有Throwable的异常类型，拦截所有的异常和错误信息
//    public R handle(Throwable throwable){
//        if (throwable instanceof ExceptionUtil)
//            return R.fail(throwable.getMessage());
//        else
//
//    }
}
